<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>跳动的心</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      .heart {
        margin: 22% 45%;
        position: relative;
        display: inline-block;
        max-width: 100%;
        animation: heart 800ms infinite alternate;
      }
      @keyframes heart {
        0% {
          transform: scale(1);
        }
        100% {
          transform: scale(1.5);
        }
      }
      .heart:hover {
        transform: scale(1.5);
      }
      .heart > .left {
        width: 150px;
        height: 150px;
        position: absolute;
        transform: rotate(45deg) translateX(113px);
        border-radius: 50% 0 0 50%;
        bottom: 100%;
        right: 100%;
        background: red;
      }
      .heart > .right {
        width: 150px;
        height: 150px;
        position: absolute;
        transform: rotate(45deg) translateY(113px);
        border-radius: 50% 50% 0 0;
        bottom: 100%;
        background: red;
        left: 100%;
      }
      .heart > .an {
        width: 150px;
        height: 150px;
        background: red;
        transform: rotate(45deg);
      }
    </style>
  </head>
  <body>
    <div class="heart">
      <div class="left"></div>
      <div class="right"></div>
      <div class="an"></div>
    </div>
  </body>
</html>
